<script setup>
import { get } from '@/net'
import { useStore } from '@/stores/counter'
import router from '@/router'

const store = useStore()
get(
  '/api/user/me',
  (data) => {
    store.auth.useStore = data
    router.push('/')
  },
  () => {
    store.auth.useStore = null
  }
)
</script>

<template>
  <router-view />
</template>

<style scoped></style>
